This invention relates to a memory system for a microprocessor, and more particularly to expanding the address space of a microprocessor beyond the total set of 2.sup.n addresses, where n is the number of bits placed on an address bus to access memory.
A microprocessor operates with instructions from a program stored in memory, often a read-only memory (ROM), to process data stored in read/write memory, commonly referred to as a random access memory (RAM). Typically, a microprocessor operates on an 8-bit basis, although for many operations, two or more 8-bit words, commonly termed bytes, may be combined into a longer word.
A 16-bit address word allows access to 2.sup.16 memory locations, which is equal to precisely 65,536 memory locations. If the microprocessor operates on an 8-bit basis, each location stores 8-bits of data or instructions. It thus follows that to read an instruction that requires an operand, three bytes must be read from memory during three successive clock pulses, a first byte consisting of the operations code (OP CODE), and two bytes consisting of a low-order address byte (LAB) and a high-order address byte (HAB).
The available address space is allocated between a program addressed by a P-counter, and data addressed by the instructions. As noted above, the program may be stored in a ROM (usually of moderate size--less than 8k), while the balance of the approximate total of 64k address space in a RAM is used for data. Both types of memories are addressed by the microprocessor over a 16-bit bus.
In some applications there is significant address space not used, which is to say that the memory is implemented with less than 2.sup.n storage locations. But in applications involving data acquisition, processing and storage with microprocessors, it is often desirable to have memory capacity greater than 2.sup.n. Necessary instructions occupy much of the memory, leaving insufficient space in a memory of 2.sup.n locations for handling large amounts of data. To add more storage capacity, the address word must be increased such as from a 16-bit (2-byte) word to a 24-bit (3-byte) word, but that slows data handling for now four clock times are required to fetch an instruction from memory, and some of the added memory capacity is given up to storing the longer addresses. In many real-time applications, the use of longer addresses would so slow computation that the ability to keep up with data flow would be lost, computation could no longer be carried out in real-time, and incoming data could be lost.